import Vue from 'vue';
import VueRouter from 'vue-router';
import Home from '../views/home.vue';
Vue.use(VueRouter);

const routes = [
    {
        path: '/',
        name: 'home',
        component: Home,
        redirect: '/view',
        children: [
            {
                path: '/view',
                name: 'view',
                component: () => import('../views/right/right.vue'),
            },
        ],
    },
    {
        path: '*',
        redirect: '/view',
    },
];

const router = new VueRouter({
    mode: 'hash' /* 'history' */,
    routes,
});

export default router;
